package com.caption.core.model.enums;

/**
 * @description: 接口响应码
 * @author: 码农
 * @date: 2022-01-01 00:33:58
 */

public enum BaseResultEnum implements ResultEnum<Integer> {
    SUCCESS(200,"操作成功"),
    NOT_LOGIN(401,"未登录或token失效"),
    NOT_AUTHORITY(403,"没有操作权限"),
    NOT_SUPPORTED_METHODS(405,"不支持请求方式"),
    MISSING_REQUIRED_ARGUMENTS(4001, "缺少必选参数"),
    INVALID_ARGUMENTS(4002, "非法的参数"),
    SERVICE_ERROR(500, "服务端异常"),
    SYSTEM_ERROR(501, "系统异常"),
    SIGN_ERROR(5009, "签名错误"),
    CALL_LIMITED(5010, "调用次数超限"),
    CALL_REPEAT(5011, "重复调用"),
    ;
    BaseResultEnum(Integer code,String desc){
        this.code=code;
        this.desc=desc;
    }
    private Integer code;

    private String desc;

    @Override
    public Integer getCode() {
        return this.code;
    }

    @Override
    public String getDesc() {
        return this.desc;
    }
}
